import instance from "@/utils/request";

//注册
export function register(user, rePassword) {
  console.log(user);
  return instance.post("/user/register?rePassword=" + rePassword, user);
}
//登录
export function login(user) {
  return instance.post("/user/login", user);
}
//是否录入身高体重，根据体重
export function getUserinfo() {
  return instance.get("/user/getInfo");
}
//修改用户信息
//用户新增体重身高信息
export function putUserInfo(user) {
  return instance.put("/user/put", user);
}
//查询用户信息
export function getUserInfo() {
  return instance.get("/user/getInfo");
}

//通过昵称获取用户信息
export function getUserInfoByNickname(nikcname) {
  return instance.get("user/getUserInfoByNickname/" + nikcname);
}
